cmake_minimum_required(VERSION 3.19)
project(vtkLearn LANGUAGES CXX)


# 设置VTK路径（根据实际安装路径调整）
# set(VTK_DIR "C:/Program Files (x86)/VTK")

# 查找VTK包
find_package(VTK REQUIRED)
set(VTK_INCLUDE_DIR  "C:/Program Files (x86)/VTK/include/vtk-9.4")
message(STATUS "VTK_INCLUDE_DIR----: ${VTK_INCLUDE_DIR}")
message(STATUS "VTK_DIR----: ${VTK_DIR}")

include_directories(${VTK_INCLUDE_DIR})
message(STATUS "VTK_USE_FILE----: ${VTK_USE_FILE}")
# message(STATUS "VTK_LIBRARIES----: ${VTK_LIBRARIES}")


add_executable(vtkLearn main.cpp)
# 链接VTK库
target_link_libraries(vtkLearn PRIVATE ${VTK_LIBRARIES})

add_executable(drawPoint draw_point.cpp)
target_link_libraries(drawPoint PRIVATE ${VTK_LIBRARIES})

add_executable(showAxes show_axes.cpp)
target_link_libraries(showAxes PRIVATE ${VTK_LIBRARIES})

add_executable(ployDataShow ploydata_show.cpp)
target_link_libraries(ployDataShow PRIVATE ${VTK_LIBRARIES})

add_executable(drawGrid vtkImageDataMultiGrid.cpp)
target_link_libraries(drawGrid PRIVATE ${VTK_LIBRARIES})

add_executable(delaunay delaunay_2d.cpp)
target_link_libraries(delaunay PRIVATE ${VTK_LIBRARIES})

add_executable(imageShow image_show.cpp)
target_link_libraries(imageShow PRIVATE ${VTK_LIBRARIES})

add_executable(imageRead image_read.cpp)
target_link_libraries(imageRead PRIVATE ${VTK_LIBRARIES})

add_executable(imageBlend imageBlend.cpp)
target_link_libraries(imageBlend PRIVATE ${VTK_LIBRARIES})

add_executable(solarSystem solar_system.cpp)
target_link_libraries(solarSystem PRIVATE ${VTK_LIBRARIES})

add_executable(animal animal.cpp)
target_link_libraries(animal PRIVATE ${VTK_LIBRARIES})

add_executable(AnimateActors ${CMAKE_SOURCE_DIR}/example/AnimateActors.cpp)
target_link_libraries(AnimateActors PRIVATE ${VTK_LIBRARIES})

add_executable(AnimationScene ${CMAKE_SOURCE_DIR}/example/AnimationScene.cpp)
target_link_libraries(AnimationScene PRIVATE ${VTK_LIBRARIES})

add_executable(RotatingSphere ${CMAKE_SOURCE_DIR}/example/RotatingSphere.cpp)
target_link_libraries(RotatingSphere PRIVATE ${VTK_LIBRARIES})

file(COPY ${CMAKE_SOURCE_DIR}/img DESTINATION ${CMAKE_BINARY_DIR})